<template>
  <div class="navBar">
    <div class="left" @click="leftClick">
      <slot name="left"></slot>
    </div>
    <div class="center">
      <slot name="center">登录</slot>
    </div>
    <div class="right" @click="rightClick">
      <slot name="right"></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Navbar',

  data () {
    return {}
  },
  mounted () {},
  methods: {
    leftClick () {
      this.$emit('leftClick')
    },
    rightClick () {
      this.$emit('rightClick')
    }
  }
}
</script>

<style lang="less" scoped>
.navBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 46px;
  background-color: #3e9df8;
  display: flex;
  text-align: center;
  align-items: center;
  line-height: 46px;
  color: #fff;
  font-size: 16px;
  z-index: 9999;
  .left {
    margin-left: 20px;
  }
  .center {
    flex: 1;
  }
  .right {
    margin-right: 20px;
  }
}
</style>
